/**
 * 基础路由
 * @type { *[] }
 */

const routes: Array<RouteRecordRaw> =[
		{
			path: '/login',
			name: 'login',
			component: () => import('../views/login/login.vue'),
			meta: {
				code:0,
				title: '登陆',
				keepAlive: true
			}
		},
		{
			path: '/',
			name: '_home',
			redirect: '/home',
			meta: {
				code:1,
				title: '',
				breadcrumb:false,
			},
			component: () => import('../components/NavBar/navBar.vue'),
			children: [
				{
					path: '/home',
					component:() => import('../views/home/index.vue'),
					name: '首页',
					meta: {
						code:1,
						title: '首页',
						keepAlive: true,
						breadcrumb:false,
					},
				}
			],
		},
		{
			path: '/assembly',
			name: '组件',
			component:() => import('../components/NavBar/navBar.vue'),
			meta: {
				code:2,
				title: '组件',
				keepAlive: true,
				breadcrumb:true,
				tagList:false,
				iconClass: 'zujian',
			},
			children: [
				{
					path: 'iconfont',
					name: '图标',
					component:() => import('../views/icon/icon.vue'),
					meta: {
						code:201,
						title: '图标',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'ziti',
					},
				},
				{
					path: 'font',
					name: '字体',
					component:() => import('../views/font/index.vue'),
					meta: {
						code:202,
						title: '字体',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'wenzi',
					},
				},
				{
					path: 'table',
					name: '表格',
					component:() => import('../views/table/index.vue'),
					meta: {
						code:203,
						title: '入库one',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'biaoge1',
					},
				},
				{
					path: 'tabs',
					name: '选项卡',
					component:() => import('../views/tabs/index.vue'),
					meta: {
						code:204,
						title: '选项卡',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'checked',
					name: '单选/多选',
					component:() => import('../views/checked/index.vue'),
					meta: {
						code:205,
						title: '选项卡',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				}
			],
		},
		{
			path: '/plug',
			name: '插件',
			component:() => import('../components/NavBar/navBar.vue'),
			meta: {
				code:3,
				title: '插件',
				keepAlive: true,
				breadcrumb:true,
				tagList:false,
				iconClass: 'chajianku-chajianku',
			},
			children: [
				{
					path: 'drag',
					name: '拖拽排序',
					component:() => import('../views/drag/index.vue'),
					meta: {
						code:301,
						title: '拖拽排序',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				}
			],
		},
		{
			path: '/404',
			component:() => import('../views/404/index.vue'),
			name: '404',
			meta: {
				title: '404',
				keepAlive: false
			}
		},
		{
		    path: '/:pathMatch(.*)', //重定向到404
		    redirect: '/404'
		}
	]

export default routes